package com.dzl.constant;

import com.dzl.config.ApplicationConfiguration;

/**
 * 上传常量
 * @author liufan
 */
public class UploadConstant {
	/**
	 * 图片类型
	 */
	public static final String IMAGE_TYPE_COMPANY = "1";	//企业图片
	public static final String IMAGE_TYPE_ORDER= "2";	//订单图片
	public static final String IMAGE_TYPE_STYLE = "3";	//款式图片
	public static final String IMAGE_TYPE_CATE = "4";	//分类图片
	public static final String IMAGE_TYPE_SERVICE = "5";	//服务图片
	public static final String IMAGE_TYPE_DRIVING = "6";	//驾照图片
	public static final String IMAGE_TYPE_PROOF = "7";	//付款证明
	public static final String IMAGE_TYPE_STYLE_ZILIAO = "8";	//款式资料
	public static final String IMAGE_TYPE_IDENTIFICATION_CARD = "9";	//个人身份证
	public static final String IMAGE_TYPE_BACK_SMALL_APP = "10";	//小程序背景图

	public static String environment = ApplicationConfiguration.getPropertiesByKey("environment");

	/**
	 * company/	企业图片路径
	 */
	public static final String IMAGE_URL_COMPANY   = "company/";

	/**
	 * order/	订单图片路径
	 */
	public static final String IMAGE_URL_ORDER  = "order/";

	/**
	 * style/	款式图片路径
	 */
	public static final String IMAGE_URL_STYLE   = "style/";

	/**
	 * cate/	分离图片路径
	 */
	public static final String IMAGE_URL_CATE   = "cate/";

	/**
	 * service	服务图片路径
	 */
	public static final String IMAGE_URL_SERVICE   = "service/";

	/**
	 * other/	其他图片路径
	 */
	public static final String IMAGE_URL_OTHER     = "other/";

	/**
	 * driving/	驾照图片路径
	 */
	public static final String IMAGE_URL_DRIVING = "driving/";

	/**
	 * proof/  凭证图片路径
	 */
	public static final String IMAGE_URL_PROOF = "proof/";

	/**
	 * 	idcard/	凭证图片路径
	 */
	public static final String IMAGE_URL_IDENTIFICATION_CARD = "idcard/";

	/**
	 * backsmallapp/  小程序背景图路径
	 */
	public static final String IMAGE_URL_BACK_SMALL_APP = "backsmallapp/";

	/**
	 *	goods/  商品目录
	 */
	public static final String IMAGE_URL_GOODS   = "goods/";

	/**
	 * category/ 商品分类
	 */
	public static final String IMAGE_URL_CATEGORY   = "category/";

	/**
	 * qrcode/ 二维码
	 */
	public static final String IMAGE_URL_QRCODE   = "qrcode/";

	/**
	 * 上传图片服务器  文件目录
	 */
	//public static final String UPL_DIR = "D:/cert/";  //E:/work/upload_dz/
	public static final String UPL_DIR = (environment == null || !"prod".equals(environment))? "D:/uploadExcel/":"/opt/project/uploadExcel";
	/**
	 * 上传图片最大size
	 */
	public static final int UPLOAD_MAX_SIZE =524288000;//最大50M
	/**
	 * 上传服务地址
	 */
	//public static String isProduct = ApplicationConfiguration.getInstance().getIsProduct();
	//public static String UPLOAD_SERVICE=(isProduct == null || "0".equals(isProduct))?"https://upload.dingzhilian.com/upload/FileUploadService":"https://upload.dingzhilian.com/upload/FileUploadService";
	public static final String UPLOAD_SERVICE = (environment == null || !"prod".equals(environment))?"https://test-upload.dingzhilian.com/upload/FileUploadService":"https://upload.dingzhilian.com/upload/FileUploadService";
	/**
	 * 批量上传订单 excel 保存路径
	 */
	public static final String excel_path =(environment == null || !"prod".equals(environment))? "D:\\uploadExcel\\":"/opt/project/uploadExcel";

	/**
	 * 访问 文件服务器地址
	 */
	public static final String URL = "https://img.dingzhilian.com/";
	/**
	 * 压缩后图片大小
	 */
	public static final String PIXEL_THAN="300x300";
}
